<template>
	<view @click="$emit('click')" :class="{'life-button':true,isFixed:isFixed}"
		:style="{ backgroundColor: bgColor, color:color}">
		<image v-if="icon" :src="icon" mode=""></image>
		<text>
			<slot></slot>
		</text>
	</view>
</template>

<script>
	export default {
		name: "life-button",
		data() {
			return {

			};
		},
		props: {
			bgColor: {
				type: String,
				default: "#fff"
			},
			color: {
				type: String,
				default: "#000"
			},
			icon: {
				type: String
			},
			isFixed: {
				type: Boolean,
				default: true
			}
		}
	}
</script>

<style lang="scss" scoped>
	.isFixed {
		position: fixed;
		bottom: 0;
		left: 0;
	}

	.life-button {
		width: 750rpx;
		height: 213rpx;
		// background: #5591AF;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;

		image {
			width: 50rpx;
			height: 50rpx;
			margin-bottom: 20rpx;
		}

		text {
			font-size: 30rpx;
			// color: #fff;
		}
	}
</style>
